<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
  <title>所有实验室</title>
  <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
</head>
<body>
<%@ include file="../header.jsp" %>
<div class="container">
  <h2>可用实验室列表</h2>
  <div class="search-container">

  </div>
  <table class="user-table">
    <thead>
    <tr>
      <th>ID</th>
      <th>实验室名称</th>
      <th>位置</th>
      <th>容量</th>
      <th>设备</th>
      <th>可用时间</th>
      <th>描述</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${labs}" var="lab">
      <tr>
        <td>${lab.labId}</td>
        <td>${lab.labName}</td>
        <td>${lab.location}</td>
        <td>${lab.capacity}</td>
        <td>${lab.equipment}</td>
        <td>${lab.availableTime}</td>
        <td>${lab.description}</td>
        <td>
          <a href="${pageContext.request.contextPath}/labReservations?action=add&labId=${lab.labId}">预约</a>
        </td>
      </tr>
    </c:forEach>
    </tbody>
  </table>
</div>
</body>
</html>